<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>缩放</title>
    <style>
        .box{
            width: 300px;
            height: 210px;
            margin: 100px auto;
            background-color: pink;
            text-align: center;
        }
        .box img{
            width: 100%;
            transition: all 0.5s;
        }
        .box:hover img{
            /* 大于1放大 */
            transform: scale(2);
            /* 小于1缩小 */
            /* transform: scale(0.5); */
            /* 等于1不变 */
            /* transform: scale(1); */
        }
    </style>
</head>
<body>
    <div class="box">
        <img src="../img/touxiang.png">
    </div>
</body>
</html>